﻿using System.ComponentModel.DataAnnotations;
using WebAPI.Util;

namespace InParkRedemptionAPI.Models
{
    public class GetAdministratorAccountListRequest : BasePageInput
    {
        [MaxLength(200, ErrorMessage = "AccountName Max Length Error")]
        public string? AccountName { get; set; }
        [MaxLength(200, ErrorMessage = "LoginName Max Length Error")]
        public string? LoginName { get; set; }
        [MaxLength(250, ErrorMessage = "Email Max Length Error")]
        public string? Email { get; set; }
        public string? Enable { get; set; } = null;
        public string? ProductControl { get; set; }
        public Guid? OperationAreaId { get; set; }
    }

    public class GetAdministratorAccountListResponse
    {
        public Guid AccountID { get; set; }
        public string? AccountName { get; set; }
        public string LoginName { get; set; }
        public string? Email { get; set; }
        public bool ProductControl { get; set; }
        public string OperationArea { get; set; }
        public Guid? OperationAreaId { get; set; }
        public bool Enable { get; set; }
        public string CreateUser { get; set; }
        public string CreateDate { get; set; }
        public string UpdateUser { get; set; }
        public string UpdateDate { get; set; }
    }

    public class UpdateAdministratorAccountRequest
    {
        [Required(ErrorMessage = "AccountId is required")]
        public Guid AccountId { get; set; }

        [MaxLength(200, ErrorMessage = "Administrator AccountName Max Length Error")]
        public string? AccountName { get; set; }

        [MaxLength(255, ErrorMessage = "Email Max Length Error")]
        public string? Email { get; set; }

        [MaxLength(50, ErrorMessage = "Password Max Length Error")]
        public string? Password { get; set; }

        [MaxLength(50, ErrorMessage = "ConfirmPassword Max Length Error")]
        public string? ConfirmPassword { get; set; }

        public Guid OperationAreaId { get; set; }

        public bool Enable { get; set; }

        public bool ProductControl { get; set; }
    }

    public class AddAdministratorAccountRequest
    {
        [MaxLength(200, ErrorMessage = "AccountName Max Length Error")]
        public string? AccountName { get; set; }

        [Required(ErrorMessage = "LoginName is required")]
        [MaxLength(200, ErrorMessage = "LoginName Max Length Error")]
        public string LoginName { get; set; }

        [MaxLength(255, ErrorMessage = "Email Max Length Error")]
        public string? Email { get; set; }

        [Required(ErrorMessage = "Password is required")]
        [MaxLength(50, ErrorMessage = "Password Max Length Error")]
        public string Password { get; set; }

        [Required(ErrorMessage = "ConfirmPassword is required")]
        [MaxLength(50, ErrorMessage = "ConfirmPassword Max Length Error")]
        public string ConfirmPassword { get; set; }

        public Guid? OperationAreaId { get; set; }

        public bool Enable { get; set; }

        public bool ProductControl { get; set; }
    }

    public class EnableAdministratorAccountRequest
    {
        [Required(ErrorMessage = "AccountId is required")]
        public string accountIds { get; set; }
        public bool enable { get; set; }
        public bool ProductControl { get; set; }

    }

}
